Skip to content

[New Rule] macOS Guest Account or Guest Access Enabled & Local Account Creation via Sysadminctl - #7193

Open
litemars wants to merge 7 commits into
mainfrom
new_rule/adding_persistence_rules_over_account_creation
Open

litemars wants to merge 7 commits into
mainfrom
new_rule/adding_persistence_rules_over_account_creation

Conversation

@litemars

@litemars litemars commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary - What I changed

Adds two new macOS detection rules covering local and default account abuse for persistence. The existing macOS SIEM rule Potential Admin Group Account Addition only covers dscl / dseditgroup, not sysadminctl.

1. Local Account Creation via Sysadminctl

Detects creation of a local user account via sysadminctl -addUser. Adversaries use this to create a backdoor account, often with -admin (admin group membership) and a clear-text -password.

Emulating activity

image

2. macOS Guest Account or Guest Access Enabled

Detects enabling of the passwordless built-in Guest account, or unauthenticated SMB/AFP guest file sharing, via sysadminctl or defaults.

Emulating activity

image

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown

Starting the rule tests ...

@litemars litemars changed the title [New rule] macOS Guest Account or Guest Access Enabled & Local Account Creation via Sysadminctl [New Rule] macOS Guest Account or Guest Access Enabled & Local Account Creation via Sysadminctl Nov 24, 2026
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown

Starting the rule tests ...

@litemars
litemars marked this pull request as ready for review November 24, 2026 13:51
Copilot AI balanced review requested due to automatic review settings November 24, 2026 13:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The defaults branch can generate false guest-access alerts for unrelated application preferences because its keys are not restricted to the relevant system preference domains or plist paths.

1 open issue
What changed in this PR

Adds two macOS persistence detections using Elastic Defend process events, extending account-abuse coverage beyond the existing dscl and dseditgroup rule.

Changes:

  • Detects local account creation through sysadminctl -addUser.
  • Detects Guest account and SMB/AFP guest-access enablement through sysadminctl or defaults.
  • Includes management-agent exclusions, investigation guides, setup instructions, and MITRE ATT&CK mappings.
File Description
rules/​macos/​persistence_local_account_creation_via_sysadminctl.toml Adds detection and investigation guidance for local account creation.
rules/​macos/​persistence_guest_account_enabled_via_command_line.toml Adds detection and investigation guidance for Guest account and guest-sharing enablement.

Review effort: Balanced

litemars and others added 2 commits December 1, 2026 11:06
Co-authored-by: Bryan Porras <bryan.porras@elastic.co>
Co-authored-by: Bryan Porras <bryan.porras@elastic.co>
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown

Starting the rule tests ...

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown

Starting the rule tests ...

Co-authored-by: Bryan Porras <bryan.porras@elastic.co>
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown

Starting the rule tests ...

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown

Starting the rule tests ...

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown

Starting the rule tests ...

@litemars
litemars requested a review from bryans3c December 1, 2026 10:49

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants